/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package deti.es.ukni.persistence.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author eurico
 */
@Embeddable
public class CommentBandPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "REFIDCOMMENT")
    private int refidcomment;
    @Basic(optional = false)
    @Column(name = "REFIDACCOUNT")
    private int refidaccount;
    @Basic(optional = false)
    @Column(name = "REFIDBAND")
    private int refidband;

    public CommentBandPK(int refidcomment, int refidaccount, int refidband) {
        this.refidcomment = refidcomment;
        this.refidaccount = refidaccount;
        this.refidband = refidband;
    }

    public int getRefidcomment() {
        return refidcomment;
    }

    public void setRefidcomment(int refidcomment) {
        this.refidcomment = refidcomment;
    }

    public int getRefidaccount() {
        return refidaccount;
    }

    public void setRefidaccount(int refidaccount) {
        this.refidaccount = refidaccount;
    }

    public int getRefidband() {
        return refidband;
    }

    public void setRefidband(int refidband) {
        this.refidband = refidband;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) refidcomment;
        hash += (int) refidaccount;
        hash += (int) refidband;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CommentBandPK)) {
            return false;
        }
        CommentBandPK other = (CommentBandPK) object;
        if (this.refidcomment != other.refidcomment) {
            return false;
        }
        if (this.refidaccount != other.refidaccount) {
            return false;
        }
        if (this.refidband != other.refidband) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "deti.es.ukni.persistence.entity.CommentBandPK[refidcomment=" + refidcomment + ", refidaccount=" + refidaccount + ", refidband=" + refidband + "]";
    }

}
